package model

import (
	"course-hub/user-srv/basic/handler/config"
	"gorm.io/gorm"
)

type School struct {
	gorm.Model
	Name  string `gorm:"type:varchar(30);comment:学校名称"`
	Phone string `gorm:"type:char(11);comment:学校电话"`
	Email string `gorm:"type:varchar(18);comment:邮箱"`
	Logo  string `gorm:"type:varchar(300);comment:学校标识"`
}

func Create(data *School) error {

	return config.DB.Create(&data).Error
}
